1. Field of the Invention
The present invention relates to an electronic device, more specifically, to a peripheral device such as a storage device connected to a computer, a communication device, or a memory card reader, capable of a self-test by using a simple testing device.
2. Description of the Related Art
Recently, along with the great progress in semiconductor integrated circuits, the increasingly lowered prices thereof, and the increased speed of communication by the Internet, personal computers (PCs) have become widely used, and the peripheral devices connected to PCs such as storage devices, communication devices and so on are in a larger and larger variety.
Various kinds of interfaces are used to connect the peripheral devices with PCs. In particular, the Universal Serial Bus (USB) and the IEEE 1394 are being used nearly as standards for such kind of interfaces, the former being mainly used recently as an interface for data transmission, and the latter being used for moving pictures or other kinds of image data. Furthermore, a drastically increasing number of the peripheral devices are being shipped which are equipped with USB or IEEE 1394 as standard configurations.
FIG. 1 is a schematic view of a usual configuration of a peripheral device equipped with a USB interface (hereinafter, referred to as “USB device”). The USB device 100 is connected to a PC 101 through a USB cable 102 that is on the basis of the USB interface.
A USB device controller 105 receives commands from applications executed in a CPU 103 of the PC 101 through a USB host controller 104 and a USB cable 102, and thereby the CPU 106 of the USB device 100 operates in response to the commands. These commands are transferred in packets, which packet is the minimum transfer unit, or in combinations of packets. A packet consists of a synchronization pattern, a packet ID, and commands. As the modulation scheme, NRZI (Non return to Zero Inverted) is used.
FIG. 2 shows a configuration of a USB cable. In the case of the full speed (transfer speed: 12 Mbps) of the USB 1.1 standard, and the case of the USB 2.0 standard (transfer speed: 480 Mbps), the USB cable 102 is comprised of signal lines D+, D−, a ground line GND, a +5V-power-line Vb, and a shield line 107 covering all the above lines. Here, the two signal lines D+ and D− form a pair and transfer commands or data by differential methods. The +5V-power-line Vb supplies electric power to the USB device 100 from the host side, such as PC 101. The shield line 107 shields the USB cable from static electricity and electromagnetic waves, and is connected to the ground line GND on the side of the PC 101, and is floated from the ground line GND on the side of the USB device 100.
Turning to the problem to be solved by the present invention, although the USB interface has advanced functions such as Plug & Play, in order to control the USB device 100, commands have to be created from the packets described above, and this makes necessary the USB host controller 104 and the PC 101 for controlling the USB host controller 104. Accordingly, PCs are indispensable when checking USB devices or at service stations for maintenance, and this makes the cost for checking higher, and thus increases manufacturing cost.